package com.lokyiu.tutorial.java.exerisce1;

import java.util.List;

public class Country {
	private List<City> cities ;
	private String name;
	private int population;
	
	public Country(String name,List<City> cities){
		this.name=name;
		for(City city : cities){
			this.population += city.getPopulation();
		}
	}
	
	public List<City> getCities(){
		return this.cities;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public int getPopulation() {
		return population;
	}
	
	public void setPopulation(List<City> cities) {
		for(City city : cities){
			this.population = city.getPopulation();
		}
	}
	
	public void setCities(List<City> cities){
		this.cities=cities;
	}
	
}
